package com.changli06._abstract.exer2;

import java.util.Scanner;

public class PayrollSystem {
    public static void main(String[] args) {
        Scanner sc = new Scanner (System.in);
//        int year = sc.nextInt();
        int month = sc.nextInt();
//        int day = sc.nextInt();
//        MyDate today = new MyDate(year, month, day);
        Employee[] emps = new Employee[2];
        emps[0] = new SalariedEmployee("sail", 001, new MyDate(2005, 9, 12)
                , 5000);
        emps[1] = new HourlyEmployee("kasl",002,new MyDate(2005,3,9)
                ,200,8);
        for (int i = 0; i < emps.length; i++) {
            System.out.println(emps[i].toString());
            double cur_earnings = emps[i].earnings();
            if(emps[i].getBirthday().getMonth()==month){
                System.out.println("生日快乐，加薪100");
                cur_earnings+=100;
            }
            System.out.println("工资为"+cur_earnings);
//            if(today == emps[i].birthday){
//                double cur_eranings = emps[i].earnings()+100;
//                System.out.println(cur_eranings);
//            }
        }
        sc.close();
    }


}
